<html>
<head><meta charset="utf-8"><title>leapfrog · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html">leapfrog</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="150922251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150922251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150922251">(Dec 05 2018 at 12:00)</a>:</h4>
<p>btw <span class="user-mention" data-user-id="116113">@lqd</span> I've got a local build using leapfrog triejoin etc</p>



<a name="150922361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150922361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150922361">(Dec 05 2018 at 12:02)</a>:</h4>
<p>oh you've switched the variants to this new API already ? I had PRs on the way so that people wouldn't have to bother</p>



<a name="150922517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150922517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150922517">(Dec 05 2018 at 12:04)</a>:</h4>
<p>I switched to the new API;  I'm not sure how you can avoid having to bother...?</p>



<a name="150922570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150922570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150922570">(Dec 05 2018 at 12:05)</a>:</h4>
<p>(forked to a new topic)</p>



<a name="150922961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150922961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150922961">(Dec 05 2018 at 12:11)</a>:</h4>
<p>this <span class="user-mention" data-user-id="116113">@lqd</span> is the work I had done <a href="https://github.com/rust-lang-nursery/polonius/pull/88" target="_blank" title="https://github.com/rust-lang-nursery/polonius/pull/88">https://github.com/rust-lang-nursery/polonius/pull/88</a></p>



<a name="150923017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923017">(Dec 05 2018 at 12:12)</a>:</h4>
<p>one can't avoid having to bother, <em>you</em> didn't have to as I had already done it :)</p>



<a name="150923040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923040">(Dec 05 2018 at 12:12)</a>:</h4>
<p>oh I see :)</p>



<a name="150923044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923044">(Dec 05 2018 at 12:12)</a>:</h4>
<p>well, it was good for me anyway to better understand :)</p>



<a name="150923070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923070">(Dec 05 2018 at 12:13)</a>:</h4>
<p>sure sure :)</p>



<a name="150923075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923075">(Dec 05 2018 at 12:13)</a>:</h4>
<p>I'd be curious <span class="user-mention" data-user-id="116113">@lqd</span> to get your 2 eurocents <a href="https://github.com/rust-lang-nursery/datafrog/pull/18" target="_blank" title="https://github.com/rust-lang-nursery/datafrog/pull/18">on these docs</a>, too</p>



<a name="150923082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923082">(Dec 05 2018 at 12:13)</a>:</h4>
<p>in particular if that sounds like an accurate summary</p>



<a name="150923126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923126">(Dec 05 2018 at 12:14)</a>:</h4>
<p>though obviously for real end-users to understand it needs a few examples</p>



<a name="150923199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923199">(Dec 05 2018 at 12:15)</a>:</h4>
<p>I will look the 2 PRs over for sure at lunchbreak (in particular I feel like there were more possible uses of leapjoin in datafrog opt but I might be misremembering)</p>



<a name="150923258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923258">(Dec 05 2018 at 12:16)</a>:</h4>
<p>also "your 2 eurocents" = <span class="emoji emoji-1f603" title="smiley">:smiley:</span></p>



<a name="150923272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923272">(Dec 05 2018 at 12:16)</a>:</h4>
<p>I think I see one missing use actually</p>



<a name="150923276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923276">(Dec 05 2018 at 12:16)</a>:</h4>
<p>oh, maybe not</p>



<a name="150923443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923443">(Dec 05 2018 at 12:18)</a>:</h4>
<p>at some point there was the question of whether or not we needed to materialize the borrows_live_at relation, it's only used in errors and we could avoid doing so with the leapjoin, so when we're not asking for these tuples (using the verbose mode flag) there was not really a need to</p>



<a name="150923638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923638">(Dec 05 2018 at 12:22)</a>:</h4>
<p>(and those might be the couple other leapjoins opportunities I remember)</p>



<a name="150923728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923728">(Dec 05 2018 at 12:23)</a>:</h4>
<p>I see</p>



<a name="150923730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923730">(Dec 05 2018 at 12:23)</a>:</h4>
<p>I think that is no longer true post bug fix</p>



<a name="150923740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923740">(Dec 05 2018 at 12:23)</a>:</h4>
<p>though you could roll that bug fix into errors I guess</p>



<a name="150923747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923747">(Dec 05 2018 at 12:23)</a>:</h4>
<p>anyway, cool</p>



<a name="150923754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923754">(Dec 05 2018 at 12:23)</a>:</h4>
<p>I might just merge the docs + publish the new datafrog</p>



<a name="150923764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923764">(Dec 05 2018 at 12:23)</a>:</h4>
<p>but first <span class="emoji emoji-2615" title="coffee">:coffee:</span></p>



<a name="150923818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150923818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150923818">(Dec 05 2018 at 12:24)</a>:</h4>
<p>oh true, very possible that the bugfix can change things up a bit here</p>



<a name="150924442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150924442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150924442">(Dec 05 2018 at 12:37)</a>:</h4>
<p>the doc comment sounds sensible to me, that the leapers propose/prevent values from their relation that should extend/filter a source tuple <span class="emoji emoji-1f44d" title="thumbs up">:thumbs_up:</span></p>



<a name="150926395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150926395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150926395">(Dec 05 2018 at 13:14)</a>:</h4>
<p>hmm it seemed it's still true that we could fold <code>borrows_live_at</code> in <code>errors</code>. Also I might have misunderstood some leapfrog behaviour before, as I would have liked to use it to compute <code>dying_can_reach_live</code>: even though it works as a simple join here, the fact that it works on Relations could allow, using the leapjoin with (or not computing) <code>borrow_live_at</code>, to remove the need to have <code>region_live_at</code> duplicated in Variable/Relation forms (a long winded explanation to save one copy, albeit a potentially big one: <code>clap</code> has 1M+ tuples in there)</p>



<a name="150927032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927032">(Dec 05 2018 at 13:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> do you want comments on the leapjoin PR that would be like "the join allows to remove us this copy X" ? There's no real need to address such comments in this PR since it works (and also since I can make a PR later with these specific changes) so I wondered if it'd be useful or not</p>



<a name="150927209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927209">(Dec 05 2018 at 13:27)</a>:</h4>
<p>sure :)</p>



<a name="150927251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927251">(Dec 05 2018 at 13:28)</a>:</h4>
<p>I saw some copies that might be removable</p>



<a name="150927261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927261">(Dec 05 2018 at 13:28)</a>:</h4>
<p>e.g. we have <code>subset</code> and then two projections from it (<code>subset_rp</code> and some other one)</p>



<a name="150927264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927264">(Dec 05 2018 at 13:28)</a>:</h4>
<p>is that what you mean?</p>



<a name="150927270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927270">(Dec 05 2018 at 13:28)</a>:</h4>
<p>exactly</p>



<a name="150927271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927271">(Dec 05 2018 at 13:28)</a>:</h4>
<p>similarly <code>requires</code></p>



<a name="150927275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927275">(Dec 05 2018 at 13:28)</a>:</h4>
<p>same as well</p>



<a name="150927280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927280">(Dec 05 2018 at 13:28)</a>:</h4>
<p>yeah, seems like only one of those projections is needed</p>



<a name="150927285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927285">(Dec 05 2018 at 13:28)</a>:</h4>
<p>those were the couple I was thinking about</p>



<a name="150927306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927306">(Dec 05 2018 at 13:29)</a>:</h4>
<p>I was debating — as an aside — whether to adjust the comments in this case to something like <code>subset((r, p), b)</code> instead of <code>subset(r, p, b)</code> or whatever</p>



<a name="150927314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927314">(Dec 05 2018 at 13:29)</a>:</h4>
<p>I think maybe keeping the datalog comments "clean"</p>



<a name="150927319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927319">(Dec 05 2018 at 13:29)</a>:</h4>
<p>but using names like <code>subset_r2p</code> is a decent compromise</p>



<a name="150927415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927415">(Dec 05 2018 at 13:30)</a>:</h4>
<p>I've had the same debate between being able to reuse the rules in say soufflé, and describing the precise layout/details of the datafrog computation</p>



<a name="150927495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927495">(Dec 05 2018 at 13:31)</a>:</h4>
<p>(maybe something that can be fixed with a proc-macro datafrog compiler cough cough :3)</p>



<a name="150927629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150927629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150927629">(Dec 05 2018 at 13:33)</a>:</h4>
<p>:)</p>



<a name="150929611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150929611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150929611">(Dec 05 2018 at 13:59)</a>:</h4>
<p>It'd be cool to have <code>filter_map</code>s capabilities in datafrog so that we could prevent symmetries a priori instead of hackily as I've done before. There are still some in <code>dying_can_reach</code> I'd like to remove, for instance.</p>



<a name="150947635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150947635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150947635">(Dec 05 2018 at 18:00)</a>:</h4>
<p>(I think I mentioned this before, but I've rechecked this datapoint with datafrog 1.0: switching loc_ins to leapjoin goes from 360ms to 130ms, but doing so prevents materializing the <code>borrow_live_at</code> tuples the verbose mode requires)</p>



<a name="150950136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150950136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150950136">(Dec 05 2018 at 18:36)</a>:</h4>
<blockquote>
<p>It'd be cool to have filter_maps capabilities in datafrog</p>
</blockquote>
<p>What sort of capabilities do you mean? In principle, it should be pretty easy to write a <code>filter</code> operator in datafrog (from variable -&gt; variable) which just passes along the filtered <code>recent</code> set of tuples. A <code>filter_map</code> operator would be a bit more expensive, as you would need to re-sort, and de-duplicate w.r.t. prior tuples.</p>
<p>Or are you thinking of something totally different from this?</p>



<a name="150950807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150950807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150950807">(Dec 05 2018 at 18:46)</a>:</h4>
<p><span class="user-mention" data-user-id="116609">@Frank McSherry</span> mostly it was a way to make this <a href="https://github.com/rust-lang-nursery/polonius/pull/78/files#diff-0e90a25f5b1ef5489f6b71a945c9a970R120" target="_blank" title="https://github.com/rust-lang-nursery/polonius/pull/78/files#diff-0e90a25f5b1ef5489f6b71a945c9a970R120">ugly hack</a> cleaner, whether it’d be a separate filter operator, or allowing the "logic" closure to return an Option of the tuple that the join helper wouldn’t push to the results, is that clearer ?</p>



<a name="150950948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150950948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150950948">(Dec 05 2018 at 18:48)</a>:</h4>
<p>I see, I think I understand. In principle, you might even like to do that at the end of the iteration, for the <code>to_add</code> members. The <code>recent</code> member is post-sorting and post-deduplication, so you may have done a bunch of work cleaning up those tuples you are about to discard.</p>



<a name="150950986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150950986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150950986">(Dec 05 2018 at 18:49)</a>:</h4>
<p>(just to prevent symmetries here and there, as you rightfully pointed out before that there were many in "subsets" for example, and removing them does make a difference)</p>



<a name="150950993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150950993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150950993">(Dec 05 2018 at 18:50)</a>:</h4>
<p>But, for example, the differential dataflow join allows you to specify a function <code>FnMut(&amp;Key, &amp;Val1, &amp;Val2) -&gt; impl Iterator&lt;Item = Result&gt;</code> which could possibly be helpful?</p>



<a name="150951083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951083">(Dec 05 2018 at 18:50)</a>:</h4>
<p>oh interesting</p>



<a name="150951098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951098">(Dec 05 2018 at 18:51)</a>:</h4>
<p>It might also be helpful to just have a <code>filter</code> method on a <code>Variable</code> which does the in-place filtering (so that you don't have to amend all of the join rules). You would still materialize many things in that case, but you wouldn't need as much surgery in the join rules themselves (especially good if you might have several <code>filter</code> predicates).</p>



<a name="150951132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951132">(Dec 05 2018 at 18:51)</a>:</h4>
<p>Adding that generality to <code>join</code> should be super easy. It worked great in differential, and the main change is that your join closures probably need a <code>Some((old_result))</code> rather than just <code>old_result</code>.</p>



<a name="150951205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951205">(Dec 05 2018 at 18:52)</a>:</h4>
<p>but for sure this was the only case I seem to have wanted such a filter, it might be more interesting in fully general DD than the specific polonius use of datafrog</p>



<a name="150951239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951239">(Dec 05 2018 at 18:53)</a>:</h4>
<p>Probably the "optimal" thing to do is determine where e.g. subsets with the same scope come into existence, in terms of which rule, and augment that rule to prevent tuples containing repetition.</p>



<a name="150951338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951338">(Dec 05 2018 at 18:54)</a>:</h4>
<p>It really is a super-easy change, though. Unless I'm missing something. And in DD computations it can help a lot to avoid materializing a bunch of things that will then just be discarded.  What sort of tuple reduction do you see with that filter?</p>



<a name="150951351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951351">(Dec 05 2018 at 18:54)</a>:</h4>
<p>right. (and it’s not very often)</p>



<a name="150951420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951420">(Dec 05 2018 at 18:55)</a>:</h4>
<p>I’ll need to check numbers on the computer when I’m back at it, esp if I’ve done it at the wrong time :) subsets was like 10-15% of the final count I think</p>



<a name="150951489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951489">(Dec 05 2018 at 18:56)</a>:</h4>
<p>Other easy changes: it isn't too hard to think about a <code>Leaper</code> implementation that doesn't contain data, just predicates. They work like the <code>FilterAnti</code> struct, in that they never propose anything, and only restrict proposals.</p>



<a name="150951504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951504">(Dec 05 2018 at 18:56)</a>:</h4>
<p>(and how this impacts downstream rules I hadn’t checked)</p>



<a name="150951521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951521">(Dec 05 2018 at 18:56)</a>:</h4>
<p>oh interesting as well :)</p>



<a name="150951525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951525">(Dec 05 2018 at 18:57)</a>:</h4>
<p>So when you use <code>from_leapjoin</code>, you could add another leaper that is just the "filter on scopes being different" leaper.</p>



<a name="150951577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951577">(Dec 05 2018 at 18:57)</a>:</h4>
<p>I stumbled upon a case I didn’t understand and which was related to filtering, I’ll investigate more details to show you if that’s ok</p>



<a name="150951644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951644">(Dec 05 2018 at 18:58)</a>:</h4>
<p>That should have the appealing property that it will filter the proposals as they flow through leapjoin, long before they get dropped into <code>subset</code>, long before they move from <code>to_add</code> into <code>recent</code>.</p>



<a name="150951679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951679">(Dec 05 2018 at 18:58)</a>:</h4>
<p>More details are good. Happy to help out here. :D</p>



<a name="150951686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951686">(Dec 05 2018 at 18:59)</a>:</h4>
<p>(IIRC leapjoin panicking because of a failing / max usize proposals on some specific pieces of data)</p>



<a name="150951696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951696">(Dec 05 2018 at 18:59)</a>:</h4>
<p>My main constraint is that I have no clue what the rules are doing.</p>



<a name="150951719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951719">(Dec 05 2018 at 18:59)</a>:</h4>
<p>Ooo, that sounds like a bug.</p>



<a name="150951777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951777">(Dec 05 2018 at 19:00)</a>:</h4>
<p>I’ll go home and gather more information</p>



<a name="150951821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951821">(Dec 05 2018 at 19:00)</a>:</h4>
<p>The intent is that any "well-formed" leapjoin has at least one contribution that is <code>extend_with</code>, so that we have positive constraints on the new values. If none have this property, it could be that all extenders say "whatever, take all values lol".</p>



<a name="150951839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951839">(Dec 05 2018 at 19:00)</a>:</h4>
<p>you, sir, are as ever quite helpful, and — literally — a scholar :D</p>



<a name="150951865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951865">(Dec 05 2018 at 19:01)</a>:</h4>
<p>np! I'll be around, and ping me elsewhere if I lose track of Zulip (which I do; <em>every</em> project uses a different chat site, literally no duplication yet).</p>



<a name="150951961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150951961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150951961">(Dec 05 2018 at 19:02)</a>:</h4>
<p>will do, thanks again for the "filter" talk + ideas</p>



<a name="150952461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150952461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150952461">(Dec 05 2018 at 19:08)</a>:</h4>
<p>(Oh that might be it, it didn’t have an extend_with IIRC, a dynamic source and 2 filter_with leapers. and that might not be well-formed at all)</p>



<a name="150953226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150953226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150953226">(Dec 05 2018 at 19:19)</a>:</h4>
<p>I just pushed a branch that has an example predicate based leaper.</p>



<a name="150953374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150953374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150953374">(Dec 05 2018 at 19:21)</a>:</h4>
<p><a href="https://github.com/rust-lang-nursery/datafrog/pull/20" target="_blank" title="https://github.com/rust-lang-nursery/datafrog/pull/20">https://github.com/rust-lang-nursery/datafrog/pull/20</a></p>



<a name="150953476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150953476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150953476">(Dec 05 2018 at 19:23)</a>:</h4>
<p>There are some other natural ones you could do, like a <code>flat_map</code> based leaper that proposes new values based on a function of <code>prefix</code>, which corresponds to integrity constraints in databases (e.g. you have a tuple with fields <code>date</code>, <code>time</code>, and <code>datetime</code>). Not necessarily interesting for you all, but the sort of thing that is easy-ish to do.</p>



<a name="150953747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150953747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150953747">(Dec 05 2018 at 19:27)</a>:</h4>
<p>nice :)</p>



<a name="150954739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150954739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150954739">(Dec 05 2018 at 19:41)</a>:</h4>
<p>Looking at the code, this rule</p>
<div class="codehilite"><pre><span></span><span class="w">            </span><span class="n">subset</span><span class="p">.</span><span class="n">from_leapjoin</span><span class="p">(</span><span class="w"></span>
<span class="w">                </span><span class="o">&amp;</span><span class="n">subset_p</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">                    </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="n">cfg_edge_rel</span><span class="p">.</span><span class="n">extend_with</span><span class="p">(</span><span class="o">|&amp;</span><span class="p">(</span><span class="n">p</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">))</span><span class="o">|</span><span class="w"> </span><span class="n">p</span><span class="p">),</span><span class="w"></span>
<span class="w">                    </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="n">region_live_at_rel</span><span class="p">.</span><span class="n">extend_with</span><span class="p">(</span><span class="o">|&amp;</span><span class="p">(</span><span class="n">_</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">r1</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">))</span><span class="o">|</span><span class="w"> </span><span class="n">r1</span><span class="p">),</span><span class="w"></span>
<span class="w">                    </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="n">region_live_at_rel</span><span class="p">.</span><span class="n">extend_with</span><span class="p">(</span><span class="o">|&amp;</span><span class="p">(</span><span class="n">_</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">_</span><span class="p">,</span><span class="w"> </span><span class="n">r2</span><span class="p">))</span><span class="o">|</span><span class="w"> </span><span class="n">r2</span><span class="p">),</span><span class="w"></span>
<span class="w">                </span><span class="p">],</span><span class="w"></span>
<span class="w">                </span><span class="o">|&amp;</span><span class="p">(</span><span class="n">_p</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="n">r1</span><span class="p">,</span><span class="w"> </span><span class="n">r2</span><span class="p">)),</span><span class="w"> </span><span class="o">&amp;</span><span class="n">q</span><span class="o">|</span><span class="w"> </span><span class="p">(</span><span class="n">r1</span><span class="p">,</span><span class="w"> </span><span class="n">r2</span><span class="p">,</span><span class="w"> </span><span class="n">q</span><span class="p">),</span><span class="w"></span>
<span class="w">            </span><span class="p">);</span><span class="w"></span>
</pre></div>


<p>doesn't contribute any new R1 == R2 cases. Rather, the second rule </p>
<div class="codehilite"><pre><span></span><span class="w">            </span><span class="n">subset</span><span class="p">.</span><span class="n">from_join</span><span class="p">(</span><span class="w"></span>
<span class="w">                </span><span class="o">&amp;</span><span class="n">live_to_dying_regions_r2pq</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="o">&amp;</span><span class="n">dying_can_reach_live</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="o">|&amp;</span><span class="p">(</span><span class="n">_r2</span><span class="p">,</span><span class="w"> </span><span class="n">_p</span><span class="p">,</span><span class="w"> </span><span class="n">q</span><span class="p">),</span><span class="w"> </span><span class="o">&amp;</span><span class="n">r1</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">r3</span><span class="o">|</span><span class="w"> </span><span class="p">(</span><span class="n">r1</span><span class="p">,</span><span class="w"> </span><span class="n">r3</span><span class="p">,</span><span class="w"> </span><span class="n">q</span><span class="p">),</span><span class="w"></span>
<span class="w">            </span><span class="p">);</span><span class="w"></span>
</pre></div>


<p>seems to be where they show up.</p>



<a name="150954802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150954802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150954802">(Dec 05 2018 at 19:42)</a>:</h4>
<p>That means that the filter leapers probably won't help, and what you want is a join whose closure can return an <code>impl Iterator&lt;Item=Result&gt;</code> to drop <code>r1 == r3</code> tuples on the floor.</p>



<a name="150955013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150955013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150955013">(Dec 05 2018 at 19:45)</a>:</h4>
<p>maybe <code>dying_can_reach_live</code> is getting them from <code>dying_can_reach</code></p>



<a name="150955132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150955132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150955132">(Dec 05 2018 at 19:46)</a>:</h4>
<p>(I think the latter had some as well) the join with <code>impl Iterator</code> is an interesting thought indeed</p>



<a name="150955169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150955169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150955169">(Dec 05 2018 at 19:47)</a>:</h4>
<p>I think that rule is </p>
<div class="codehilite"><pre><span></span>// subset(R1, R3, Q) :-
//   live_to_dying_regions(R1, R2, P, Q),
//   dying_can_reach_live(R2, R3, P, Q).
</pre></div>


<p>and <code>R1 == R3</code> can probably happen even without <code>dying_can_reach_live</code> screwing things up. Maybe I misunderstand, though!</p>



<a name="150955326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150955326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150955326">(Dec 05 2018 at 19:48)</a>:</h4>
<p>I have a branch somewhere to add statistics the the datafrog compute which I should refresh; might be also easy to add some predicates to check which rule and which rounds contribute to which "predicate stat"</p>



<a name="150955331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150955331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150955331">(Dec 05 2018 at 19:48)</a>:</h4>
<p>But yeah it looks like <code>dying_can_reach</code> could get them too, from its second rule.</p>



<a name="150955760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150955760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150955760">(Dec 05 2018 at 19:54)</a>:</h4>
<p>ok yeah, the case I was seeing was not well-formed, no extend leapers only filters — so I assume it's expected for it to fail. </p>
<p>I was modeling <code>errors(B, P) :- requires(R, B, P), region_live_at(R, P), invalidates(P, B).</code> as </p>
<div class="codehilite"><pre><span></span>errors.from_leapjoin(
    &amp;requires_rp,
    &amp;mut [
        &amp;mut region_live_at_rel.filter_with(|&amp;((r, p), _b)| (r, p)),
        &amp;mut invalidates_rel.filter_with(|&amp;((_r, p), b)| (p, b)),
    ],
    |&amp;((_r, p), b), &amp;()| (b, p)
);
</pre></div>



<a name="150955835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150955835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150955835">(Dec 05 2018 at 19:55)</a>:</h4>
<p>Ah, ok. So this is probably painful because <code>requires</code> is the variable, and what you need to start from?</p>



<a name="150955911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150955911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150955911">(Dec 05 2018 at 19:56)</a>:</h4>
<p>Let me ponder that. I'm sure there is a way to start from <code>requires</code> and "pretend" that someone has just proposed some values. At which point you can just stitch on the existing leapers, not exactly doing a join but just filtering things down.</p>



<a name="150955926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150955926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150955926">(Dec 05 2018 at 19:56)</a>:</h4>
<p>yes. it's not extremely painful or anything mind you, I only stumbled upon this while trying to remove an intermediate variable, it does work perfectly otherwise :)</p>



<a name="150955956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150955956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150955956">(Dec 05 2018 at 19:57)</a>:</h4>
<p>More generally, "treefrog leapjoin" is a specific instance of "delta queries", where you can implement joins and such more efficiently than the binary joins that datafrog has by default.</p>



<a name="150956238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150956238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150956238">(Dec 05 2018 at 20:00)</a>:</h4>
<p>(btw my brain is now forever broken when trying to remember the join name, where I randomly mix and match pieces between it and leapfrog triejoin :)</p>



<a name="150956278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150956278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150956278">(Dec 05 2018 at 20:01)</a>:</h4>
<p>inb4 a paper "a new join name, but at what COST"</p>



<a name="150956779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150956779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150956779">(Dec 05 2018 at 20:07)</a>:</h4>
<blockquote>
<p>I'm sure there is a way to start from <code>requires</code> and "pretend" that someone has just proposed some values</p>
</blockquote>
<p>oh like an <code>extend_with</code> closure returning the full tuple or similar trickery ?</p>



<a name="150957030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150957030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150957030">(Dec 05 2018 at 20:10)</a>:</h4>
<p>All that the rest of the leapjoin algorithm needs is a <code>Vec&lt;Val&gt;</code> for each <code>Tuple</code>, and so if you show up with a <code>Relation&lt;(Tuple, Val)&gt;</code> we can re-stage it temporarily as a bunch of <code>(Tuple, Vec&lt;Val&gt;)</code> for long enough for the other relations to express their opinions.</p>



<a name="150957191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150957191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150957191">(Dec 05 2018 at 20:13)</a>:</h4>
<p>It needs a bit of surgery, and might look like re-writing some of <code>leapjoin_into</code> using the fact that you have <code>Leaper</code> implementations for those other relations.</p>



<a name="150957311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150957311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150957311">(Dec 05 2018 at 20:15)</a>:</h4>
<p>But, if you make a note of this and collect a few of them (or just sit on this one for a while) I can try a re-think of some of the traits to accommodate more patterns that might be useful.</p>



<a name="150957373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150957373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150957373">(Dec 05 2018 at 20:16)</a>:</h4>
<p>could it be something we other contribots could do (albeit with a bit of guidance I assume) so that you wouldn't have to spend time doing it ?</p>



<a name="150957526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150957526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150957526">(Dec 05 2018 at 20:19)</a>:</h4>
<p>If you like, sure! Ideally, the <code>Leaper</code> trait is sufficient to do things like this. It is meant to capture enough info to let you dance through various candidate extensions, though it does ask for them to be in vectors, I suppose.</p>



<a name="150957597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150957597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150957597">(Dec 05 2018 at 20:20)</a>:</h4>
<p>sure I'll document this case (with data, like in a test) and look for others (I think I might have had another one), to see if these requirements can be just slight surgery, which could offer new flexibility without needing to go the harder and possibly not-that-useful route of leapjoins over Variables</p>



<a name="150957693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150957693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150957693">(Dec 05 2018 at 20:21)</a>:</h4>
<p>Leapjoins over variables will probably eventually show up. They really aren't that horrible, but they clash a bit with the "owned and ref unification" PR. They are the sort of thing that you would have needed back in the pre-optimized version of Polonius, where there was a self-join between <code>subset</code> and itself.</p>



<a name="150957780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150957780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150957780">(Dec 05 2018 at 20:22)</a>:</h4>
<p>But yeah if you note down the pain points, I'm happy to help out, especially if it turns out to be pretty easy and just a bit of coding. One of the <span class="emoji emoji-1f438" title="frog">:frog:</span> intents was that there was little enough internals that you could drop in and just screw around with vectors if you need to.</p>



<a name="150957918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150957918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150957918">(Dec 05 2018 at 20:24)</a>:</h4>
<p>I was also hoping one day for fun to look at parallelizing the 3 "semi-naive evaluation joins" to see if it makes a difference on bigger relations :)</p>



<a name="150957924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150957924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150957924">(Dec 05 2018 at 20:24)</a>:</h4>
<p>Actually, re-thinknig that "start from <code>requires</code>" issue, it could be interesting to break leapjoin into two parts: 1. a positive "propose some values" step, and then 2. "as many restrictions as you want".</p>



<a name="150957965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150957965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Frank McSherry <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150957965">(Dec 05 2018 at 20:25)</a>:</h4>
<p>This would allow some flexibility for how you start out, but also insist that you start from something and use types to make sure you don't lack a positive constraint on the extensions.</p>



<a name="150958239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150958239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150958239">(Dec 05 2018 at 20:29)</a>:</h4>
<p>could be nice, alleviating the need for a WF check, and providing a direct place to have the "pretending someone proposed a value" before the restrictions</p>



<a name="150959070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/150959070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#150959070">(Dec 05 2018 at 20:41)</a>:</h4>
<p>I'd like to chime in and thank y'all for this conversation. I still know nothing about all this, but this discussion was like... only 2 steps away from what I think I might know, so it's tantalizing to attempt to follow.</p>



<a name="151001289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001289">(Dec 06 2018 at 12:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> since you seem to be having fun: I think we can only have <code>subset_pr1</code> and remove <code>subset_p</code> :)</p>



<a name="151001361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001361">(Dec 06 2018 at 12:08)</a>:</h4>
<p>(and also only <code>requires_rp</code> I think)</p>



<a name="151001379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001379">(Dec 06 2018 at 12:09)</a>:</h4>
<p>oh, I didn't see all these comments before =) now I see what the 'predicate leaper' was all about</p>



<a name="151001537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001537">(Dec 06 2018 at 12:12)</a>:</h4>
<blockquote>
<p>Ah, ok. So this is probably painful because <code>requires</code> is the variable, and what you need to start from?</p>
</blockquote>
<p>I don't follow this though</p>



<a name="151001550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001550">(Dec 06 2018 at 12:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116113">@lqd</span> hmm let me take a look =) using <code>perf stat</code> you can definitely see some reduction (not sure if you saw my commit messages), even though removing variables doesn't seem to affect the wallclock much</p>



<a name="151001571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001571">(Dec 06 2018 at 12:13)</a>:</h4>
<p>I see, you are correct</p>



<a name="151001578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001578">(Dec 06 2018 at 12:13)</a>:</h4>
<p>yeah I did see them, at least removing the subset copies looked interesting, 3%</p>



<a name="151001768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001768">(Dec 06 2018 at 12:17)</a>:</h4>
<p>it also just seems like the code is a bit easier to understand this way</p>



<a name="151001776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001776">(Dec 06 2018 at 12:17)</a>:</h4>
<p>only one copy of the core tuples</p>



<a name="151001778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001778">(Dec 06 2018 at 12:17)</a>:</h4>
<p>I also noticed cloning the facts, which we do unequivocally in the engine, takes around 5ms on clap, not world shattering but LocationInsensitive clocks in at around 130ms here so it's not that insignificant. It could be nice to avoid it, esp. once we combine the passes, and maybe Frank's other PR about owned and ref values is a step towards this (but maybe it's just about the leapjoin so idk)</p>



<a name="151001784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001784">(Dec 06 2018 at 12:18)</a>:</h4>
<p>yes :D</p>



<a name="151001851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001851">(Dec 06 2018 at 12:19)</a>:</h4>
<p>another 0.94%</p>



<a name="151001868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001868">(Dec 06 2018 at 12:19)</a>:</h4>
<p>re: the cloning, yes, I've been thinking about it,</p>



<a name="151001875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001875">(Dec 06 2018 at 12:19)</a>:</h4>
<p>I feel like the thing to do would be to just push some of that work into the fact generation in the compiler ultimately</p>



<a name="151001878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001878">(Dec 06 2018 at 12:19)</a>:</h4>
<p>nice little win again :)</p>



<a name="151001882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001882">(Dec 06 2018 at 12:19)</a>:</h4>
<p>that said</p>



<a name="151001933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001933">(Dec 06 2018 at 12:20)</a>:</h4>
<p>well, I guess I just want to experiment with moving more of the logic into datalog</p>



<a name="151001938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001938">(Dec 06 2018 at 12:20)</a>:</h4>
<p>I'd prefer if we can get the compiler's facts to be a bit more primitive</p>



<a name="151001964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001964">(Dec 06 2018 at 12:20)</a>:</h4>
<p>and I <em>still</em> want to write up how the datafrog-opt rules work and investigate my proposed alternative :P which I haven't had time to do...</p>



<a name="151001971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001971">(Dec 06 2018 at 12:21)</a>:</h4>
<blockquote>
<p>nice little win again :)</p>
</blockquote>
<p>yeah</p>



<a name="151001999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151001999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151001999">(Dec 06 2018 at 12:21)</a>:</h4>
<p>while things are still in flux it doesn't matter all that much rn yeah, just something on the todo list :)</p>



<a name="151002007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002007">(Dec 06 2018 at 12:21)</a>:</h4>
<p>maybe time to merge that PR</p>



<a name="151002012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002012">(Dec 06 2018 at 12:21)</a>:</h4>
<p><a href="https://github.com/rust-lang-nursery/polonius/pull/88" target="_blank" title="https://github.com/rust-lang-nursery/polonius/pull/88">https://github.com/rust-lang-nursery/polonius/pull/88</a> I mean</p>



<a name="151002013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002013">(Dec 06 2018 at 12:21)</a>:</h4>
<p>agreed</p>



<a name="151002059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002059">(Dec 06 2018 at 12:22)</a>:</h4>
<blockquote>
<p>(and also only <code>requires_rp</code> I think)</p>
</blockquote>
<p>oh I can maybe do this first...</p>



<a name="151002084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002084">(Dec 06 2018 at 12:22)</a>:</h4>
<p>I do wonder about your thoughts about being able to skip generating borrows_live_at in location_insensitive and datafrogopt ?</p>



<a name="151002116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002116">(Dec 06 2018 at 12:23)</a>:</h4>
<p>it's important to have and pretty much the only thing we test at the moment, but it's not strictly speaking necessary</p>



<a name="151002204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002204">(Dec 06 2018 at 12:25)</a>:</h4>
<p>I think we should skip it</p>



<a name="151002215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002215">(Dec 06 2018 at 12:25)</a>:</h4>
<p>and test only for errors</p>



<a name="151002219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002219">(Dec 06 2018 at 12:25)</a>:</h4>
<p>we just need better tests :P</p>



<a name="151002238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002238">(Dec 06 2018 at 12:25)</a>:</h4>
<p>that's something else I've been meaning to do</p>



<a name="151002242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002242">(Dec 06 2018 at 12:25)</a>:</h4>
<p>but maybe better to open some issues</p>



<a name="151002289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002289">(Dec 06 2018 at 12:26)</a>:</h4>
<p>go through "key examples" and make more polonius unit tests from them</p>



<a name="151002293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002293">(Dec 06 2018 at 12:26)</a>:</h4>
<p>yeah :) (for datafrog_opt we might however also need the leapjoin without extend_with we mentioned yesterday as well)</p>



<a name="151002298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002298">(Dec 06 2018 at 12:26)</a>:</h4>
<p>it'd be really nice if I had any confidence that <code>cargo test --all</code> meant something</p>



<a name="151002320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002320">(Dec 06 2018 at 12:26)</a>:</h4>
<p>0.97%</p>



<a name="151002322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002322">(Dec 06 2018 at 12:26)</a>:</h4>
<p>(for requires)</p>



<a name="151002331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002331">(Dec 06 2018 at 12:27)</a>:</h4>
<p>leapjoin is very nice :)</p>



<a name="151002343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002343">(Dec 06 2018 at 12:27)</a>:</h4>
<p>that said, possible diagnostics work and all could impact whether we need the borrows_live_at or not</p>



<a name="151002385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002385">(Dec 06 2018 at 12:28)</a>:</h4>
<p>true, maybe</p>



<a name="151002400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002400">(Dec 06 2018 at 12:28)</a>:</h4>
<p>maybe worth waiting on that</p>



<a name="151002409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002409">(Dec 06 2018 at 12:28)</a>:</h4>
<p>once these are more clear, it could also help towards deciding whether cfg compression is good or not</p>



<a name="151002510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002510">(Dec 06 2018 at 12:30)</a>:</h4>
<p>Overall measurements from this branch on clap:</p>
<table>
<thead>
<tr>
<th>point</th>
<th>instructions</th>
<th>ratio</th>
</tr>
</thead>
<tbody>
<tr>
<td>master</td>
<td>28,514,865,669</td>
<td>1.0</td>
</tr>
<tr>
<td>529b0c9 (adopt datafrog 1.0)</td>
<td>27,062,590,519</td>
<td>0.94</td>
</tr>
<tr>
<td>2df8fc3 (use only <code>requires_rp</code>)</td>
<td>21,322,189,163</td>
<td>0.74</td>
</tr>
</tbody>
</table>



<a name="151002514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002514">(Dec 06 2018 at 12:30)</a>:</h4>
<p>I actually have no idea why the datafrog 1.0 switch made any difference</p>



<a name="151002518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002518">(Dec 06 2018 at 12:30)</a>:</h4>
<p>but still, 25%, not bad</p>



<a name="151002539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002539">(Dec 06 2018 at 12:31)</a>:</h4>
<p>I'll just test on rustc one last time I guess</p>



<a name="151002551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002551">(Dec 06 2018 at 12:31)</a>:</h4>
<p>there were some sorting and alloc PRs between 0.1 and 1.0 IIRC</p>



<a name="151002557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002557">(Dec 06 2018 at 12:31)</a>:</h4>
<p>ah, nice, yes</p>



<a name="151002945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151002945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151002945">(Dec 06 2018 at 12:37)</a>:</h4>
<p>adding rustc's "smoke test" facts to polonius' inputs and test that it errors correctly would boost (at least my) confidence in our tests</p>



<a name="151003564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151003564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151003564">(Dec 06 2018 at 12:48)</a>:</h4>
<p>seems to get the same results as before</p>



<a name="151003572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151003572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151003572">(Dec 06 2018 at 12:48)</a>:</h4>
<p>merged <a href="https://github.com/rust-lang-nursery/polonius/pull/88" target="_blank" title="https://github.com/rust-lang-nursery/polonius/pull/88">https://github.com/rust-lang-nursery/polonius/pull/88</a></p>



<a name="151003650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151003650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151003650">(Dec 06 2018 at 12:49)</a>:</h4>
<p>awesome job niko and frank :)</p>



<a name="151006233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151006233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151006233">(Dec 06 2018 at 13:35)</a>:</h4>
<p>uh and <em>you</em> <span class="user-mention" data-user-id="116113">@lqd</span> :P</p>



<a name="151006246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151006246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151006246">(Dec 06 2018 at 13:35)</a>:</h4>
<p>ps, I didn't look at naive / location-insensitive, maybe there are leapfrog opportunities there?</p>



<a name="151006355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151006355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151006355">(Dec 06 2018 at 13:36)</a>:</h4>
<p>there are indeed :) those were the reasons for the "do we generate borrows_live_at for location_insensitive" questions</p>



<a name="151006413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151006413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151006413">(Dec 06 2018 at 13:37)</a>:</h4>
<p>I'll open a PR for location_insensitive later today, also probably add the smoke test just in case, and we can discuss there (I'm not imagining location_insensitive ever needing borrows like datafrogopt needs to, but you never know)</p>



<a name="151038801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151038801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151038801">(Dec 06 2018 at 20:00)</a>:</h4>
<p>(the 2 remaining variants porting PRs are done, working on adding Matthew's smoke tests now)</p>



<a name="151049052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151049052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151049052">(Dec 06 2018 at 22:30)</a>:</h4>
<p>(Matthew's smoke tests immediately showed a problem in the Naive variant <span class="emoji emoji-1f602" title="joy">:joy:</span> — edit: PR fixing it is up as well)</p>



<a name="151099452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099452">(Dec 07 2018 at 09:40)</a>:</h4>
<blockquote>
<p>(the 2 remaining variants porting PRs are done, working on adding Matthew's smoke tests now)</p>
</blockquote>
<p>remind what "matthew's smoke tests" are?</p>



<a name="151099468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099468">(Dec 07 2018 at 09:40)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/31b97f789f4809d0bff76e931a5dfd4fece079da/src/test/ui/nll/polonius-smoke-test.rs" target="_blank" title="https://github.com/rust-lang/rust/blob/31b97f789f4809d0bff76e931a5dfd4fece079da/src/test/ui/nll/polonius-smoke-test.rs">this test</a></p>



<a name="151099497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099497">(Dec 07 2018 at 09:41)</a>:</h4>
<p>ah, nice</p>



<a name="151099547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099547">(Dec 07 2018 at 09:42)</a>:</h4>
<p>I just landed a PR -- hadn't noticed all of your PRs yet :P -- that adds at least one such tricky case as well (vec-push-ref)</p>



<a name="151099555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099555">(Dec 07 2018 at 09:42)</a>:</h4>
<p><a href="https://github.com/rust-lang-nursery/polonius/pull/94" target="_blank" title="https://github.com/rust-lang-nursery/polonius/pull/94">link</a></p>



<a name="151099562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099562">(Dec 07 2018 at 09:42)</a>:</h4>
<p>though I'm only comparing against naive</p>



<a name="151099574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099574">(Dec 07 2018 at 09:43)</a>:</h4>
<p>I was thinking it'd be nice to extend the testing infrastructure to actually encode the <em>expected</em> results</p>



<a name="151099580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099580">(Dec 07 2018 at 09:43)</a>:</h4>
<p>I did see this cool new test case yesterday <span class="emoji emoji-1f44d" title="thumbs up">:thumbs_up:</span> (and now I have conflicts on the cargo.lock which I had already fixed ;) slowly growing confidence in tests is nice</p>



<a name="151099603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099603">(Dec 07 2018 at 09:44)</a>:</h4>
<p>agreed, a couple tests do check the expected results but not many, if things change too much we might miss changes in expected results :/</p>



<a name="151099679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099679">(Dec 07 2018 at 09:44)</a>:</h4>
<p>yeah, it certainly makes changes to naive kind of scary</p>



<a name="151099683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099683">(Dec 07 2018 at 09:45)</a>:</h4>
<p>it's not that hard to encode expected results</p>



<a name="151099703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099703">(Dec 07 2018 at 09:45)</a>:</h4>
<p>ps <span class="user-mention" data-user-id="116113">@lqd</span> I was also planning to mess a bit with applying <a href="https://github.com/BurntSushi/quickcheck" target="_blank" title="https://github.com/BurntSushi/quickcheck"><code>quickcheck</code></a> to datafrog, just because I've never tried using it before</p>



<a name="151099710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099710">(Dec 07 2018 at 09:45)</a>:</h4>
<p>it's surely going to be interesting :)</p>



<a name="151099760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099760">(Dec 07 2018 at 09:46)</a>:</h4>
<p>as well as datafrog unit tests, maybe benchmarks could be nice, seeing how a lot of PRs are about performance or ensuring it doesn't regress (Reed had started doing a couple last summer and we can dig them up)</p>



<a name="151099797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151099797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151099797">(Dec 07 2018 at 09:47)</a>:</h4>
<p>maybe we could extend the program parser to encode expected results in the tests ergonomically</p>



<a name="151100375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151100375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151100375">(Dec 07 2018 at 10:01)</a>:</h4>
<p>ps <span class="user-mention" data-user-id="116113">@lqd</span> I want to merge <a href="https://github.com/rust-lang-nursery/polonius/pull/91" target="_blank" title="https://github.com/rust-lang-nursery/polonius/pull/91">https://github.com/rust-lang-nursery/polonius/pull/91</a> but it has conflicts on Cargo.lock</p>



<a name="151100382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151100382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151100382">(Dec 07 2018 at 10:01)</a>:</h4>
<p>yeah I'm rebasing rn :)</p>



<a name="151100544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151100544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151100544">(Dec 07 2018 at 10:04)</a>:</h4>
<p>also &lt;<a href="https://github.com/rust-lang-nursery/polonius/pull/93" target="_blank" title="https://github.com/rust-lang-nursery/polonius/pull/93">https://github.com/rust-lang-nursery/polonius/pull/93</a>&gt; is confusing me -- the bug seems real =) but I'm confused why any of the tests are passing at all... <em>oh</em> <code>test_facts</code> is asserting that <code>borrow_live_at</code> is equal, ok</p>



<a name="151100592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151100592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151100592">(Dec 07 2018 at 10:05)</a>:</h4>
<p>in general, I'd like to extend the <code>tests!</code> macro so it looks more like:</p>
<div class="codehilite"><pre><span></span><span class="n">tests</span><span class="o">!</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">issue_47680</span><span class="p">(</span><span class="s">&quot;issue-47680&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;main&quot;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="p">(</span><span class="n">expected</span><span class="w"> </span><span class="n">error</span><span class="o">-</span><span class="n">tuples</span><span class="w"> </span><span class="n">go</span><span class="w"> </span><span class="n">here</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">...</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="151100670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151100670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151100670">(Dec 07 2018 at 10:06)</a>:</h4>
<p>the tests were mostly checking <code>borrows_live_at</code> indeed, checking errors we can see a difference with datafrogopt</p>



<a name="151100706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151100706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151100706">(Dec 07 2018 at 10:07)</a>:</h4>
<p>all the rules were ported to generate errors, all but setting up the initial facts of a relation, thus generating no errors which the tests missed :)</p>



<a name="151100725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151100725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151100725">(Dec 07 2018 at 10:07)</a>:</h4>
<p>heh</p>



<a name="151100820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151100820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151100820">(Dec 07 2018 at 10:09)</a>:</h4>
<p>seems like we should just move everything over to "expected errors" and stop inspecting borrow-live-at in general</p>



<a name="151100877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151100877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151100877">(Dec 07 2018 at 10:10)</a>:</h4>
<p>yeah but borrow_live_at is so valuable I wonder how to do it</p>



<a name="151100918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151100918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151100918">(Dec 07 2018 at 10:11)</a>:</h4>
<p>I wish there was a way to still test them when we need to</p>



<a name="151101091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151101091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151101091">(Dec 07 2018 at 10:15)</a>:</h4>
<p>(cargo.lock conflicts in PRs with multiple commits are <em>ugh</em> :)</p>



<a name="151101317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151101317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151101317">(Dec 07 2018 at 10:18)</a>:</h4>
<blockquote>
<p>I wish there was a way to still test them when we need to</p>
</blockquote>
<p>I guess we can compute them when the <code>dump_flags</code> bool is true (and just duplicate a bit the rules)</p>



<a name="151101481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151101481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151101481">(Dec 07 2018 at 10:21)</a>:</h4>
<p>we'd still have to have the variables and relations (albeit empty) and check whether to fill them at each compute round. that's how I've been testing its removal, but wondered about #cfgs and all</p>



<a name="151101826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151101826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151101826">(Dec 07 2018 at 10:27)</a>:</h4>
<p>yes, we'd still have to do that. seems ok</p>



<a name="151101842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151101842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151101842">(Dec 07 2018 at 10:27)</a>:</h4>
<p>cfg has the downside that we can't enable it dynamically</p>



<a name="151101846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151101846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151101846">(Dec 07 2018 at 10:28)</a>:</h4>
<p>but I guess you might say "only do it for <code>#[cfg(test)]</code>" or something</p>



<a name="151101888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151101888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151101888">(Dec 07 2018 at 10:28)</a>:</h4>
<p>or a cargo feature</p>



<a name="151101898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151101898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151101898">(Dec 07 2018 at 10:28)</a>:</h4>
<p>I doubt the branches would be a real cost though (nor an empty variable)</p>



<a name="151101979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151101979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151101979">(Dec 07 2018 at 10:30)</a>:</h4>
<p>right</p>



<a name="151101994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151101994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151101994">(Dec 07 2018 at 10:30)</a>:</h4>
<p>the deps <a href="https://github.com/rust-lang-nursery/polonius/pull/91" target="_blank" title="https://github.com/rust-lang-nursery/polonius/pull/91">PR</a> should be good to go now</p>



<a name="151102012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151102012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151102012">(Dec 07 2018 at 10:31)</a>:</h4>
<p>(we might enjoy having bors to recheck PRs and tests :)</p>



<a name="151102325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151102325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151102325">(Dec 07 2018 at 10:38)</a>:</h4>
<p>yeah could setup bors ng or something</p>



<a name="151104325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151104325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151104325">(Dec 07 2018 at 11:19)</a>:</h4>
<p>ok, <span class="user-mention" data-user-id="116113">@lqd</span>, <a href="https://github.com/rust-lang-nursery/polonius/pull/92" target="_blank" title="https://github.com/rust-lang-nursery/polonius/pull/92">https://github.com/rust-lang-nursery/polonius/pull/92</a> has conflicts now =)</p>



<a name="151104381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151104381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151104381">(Dec 07 2018 at 11:20)</a>:</h4>
<p>:)</p>



<a name="151104385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151104385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151104385">(Dec 07 2018 at 11:20)</a>:</h4>
<p>on it</p>



<a name="151104416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151104416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151104416">(Dec 07 2018 at 11:21)</a>:</h4>
<p>inb4 "introducing MEGA PRs" a single PR for all one's needs</p>



<a name="151105075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151105075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151105075">(Dec 07 2018 at 11:34)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> rebased :)</p>



<a name="151184350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151184350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151184350">(Dec 08 2018 at 17:07)</a>:</h4>
<blockquote>
<p>with applying quickcheck to datafrog</p>
</blockquote>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I'd recommend <a href="https://docs.rs/proptest/0.7.0/proptest/" target="_blank" title="https://docs.rs/proptest/0.7.0/proptest/">proptest</a></p>



<a name="151184367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151184367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151184367">(Dec 08 2018 at 17:08)</a>:</h4>
<p>I've found it to be a bit more usable</p>



<a name="151184422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151184422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151184422">(Dec 08 2018 at 17:09)</a>:</h4>
<p>Namely, the code you write to generate testcases has been more composable</p>



<a name="151478373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151478373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151478373">(Dec 11 2018 at 20:30)</a>:</h4>
<p>yeah I started messing with that but got distracted</p>



<a name="151478376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/leapfrog/near/151478376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/leapfrog.html#151478376">(Dec 11 2018 at 20:30)</a>:</h4>
<p>will try to get back to it this week maybe</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>